package cn.wjc.demo.common.service;

import cn.wjc.demo.common.entity.BaseEntity;
import cn.wjc.demo.common.mapper.BasisMapper;
import cn.wjc.demo.common.page.PageQuery;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;

public class BaseServiceImpl<M extends BasisMapper<T>, T extends BaseEntity> extends ServiceImpl<M, T> implements IBaseService<T> {


    @Autowired
    private BasisMapper basisMapper;


    @Override
    public int insert(T entity) {
        return this.basisMapper.insert(entity);
    }


    @Override
    public int update(T entity) {
        return this.basisMapper.updateById(entity);
    }
}
